home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / menu20.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1984-04-24  |  1.3 KB  |  34 lines

  1. 10  DIM PROG$(64)        'MENU PROGRAM   - Creates Menues of basic files -
  2. 20  REM Converted to read 2.0 dos files on 3-5-84 by Isaac W. Spetgang, MD
  3. 30  SCREEN 0: KEY OFF:KEY 1,"RUN"+CHR$(34)+"MENU20.BAS"+CHR$(13)+CHR$(13)
  4. 40  CLS:WIDTH 80:COLOR 0,0:FILES "*.BAS"   'DISPLAY BASIC FILNAMES invisibly
  5. 50  SW=1
  6. 60  FOR DR%=1 TO 24      'Row on screen to be Read
  7. 70  IF SW=1 THEN SW=0:GOTO 150
  8. 80  FOR DC%=0 TO 54 STEP 18 'File Names are in FOUR Columns
  9. 90  IF CHR$(SCREEN(DR%,DC%+1))=" " THEN 180   'Stop when no more File names
  10. 100  AR%=AR%+1            'Go to next row in Array
  11. 110  FOR L%=1 TO 8        'Read first 8 characters of File name
  12. 120  PROG$(AR%)=PROG$(AR%)+CHR$(SCREEN(DR%,DC%+L%))    'Add name to Array
  13. 130  NEXT
  14. 140  NEXT
  15. 150  NEXT
  16. 160  WIDTH 80
  17. 170  CLS
  18. 180  LOCATE 1,15: COLOR 14,0: PRINT "BASIC Programs on this diskette:"
  19. 190  LOCATE 2,12:PRINT "...0  to EXIT menu OR -1 to EXIT to DOS 2.0.."
  20. 200  FOR DC%=1 TO 27 STEP 13     'Display file names in 3 columns
  21. 210  FOR DR%=3 TO 23             'from screen row 3 to 23
  22. 220  I%=I%+1              ' Go to next row in Array
  23. 230  IF PROG$(I%)="" THEN 280  ELSE LOCATE DR%,DC%
  24. 240  COLOR 0,7:PRINT USING "##";I%;:
  25. 250  COLOR 7,0: PRINT " ";PROG$(I%);    'Stop when Array is empty
  26. 260  NEXT DR%
  27. 270  NEXT DC%
  28. 280  LOCATE 25,1: INPUT "Enter Number of Program Desired: ";P
  29. 290  LOCATE 25,1:PRINT "Press F1 to return to Menu when finished";
  30. 300  SOUND  700,2:SOUND 700,2
  31. 310  IF P=0 THEN WIDTH 80:END
  32. 320  IF P=-1 THEN SYSTEM
  33. 330  RUN PROG$(P)       'RUN  the Program Selected
  34.